<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function user(){
            return new Promise((resolve,reject)=>{
                console.log('开始获取用户信息');
                try{
                    setTimeout(()=>{
                        console.log('获取用户信息成功');
                        const user = {
                            name : 'cz',
                            age : 18,
                            scr : '男'
                        }
                        resolve(user)
                    },1000)
                }catch(e){
                    reject(e.message)
                }
            })
        }


        function phone(user){
            return new Promise((resolve,reject)=>{
                console.log('开始获取用户信息');
                try{
                    setTimeout(()=>{
                        console.log('获取用户电话成功');
                        const phoneNumber = {
                           number : 12121212121
                        }
                        resolve({...user,...phoneNumber})
                    },1000)
                }catch(e){
                    reject(e.message)
                }
            })
        }

        async function get(){
            const pp = await user()
            const kk = await phone(pp)

            console.log('全部数据',kk);
            }

            get();   
    </script>
</body>
</html>